Log in Register Dashboard Temp Share Shortlinks Frames API

cody - HTMLify profile

cody's Profile Picture

cody

4270 Files

632708 Views

Latest files of /cody/swapnilsparsh/30DaysOfJavaScript/07 - Dynamic Form Field

font/ cody/swapnilsparsh/30DaysOfJavaScript/07 - Dynamic Form Field/font/
1 Items
  • sans.ttf
  • assets/ cody/swapnilsparsh/30DaysOfJavaScript/07 - Dynamic Form Field/assets/
    1 Items
  • form.png
  • style.css cody/swapnilsparsh/30DaysOfJavaScript/07 - Dynamic Form Field/style.css
    102 Views
    0 Comments
    @font-face {
    font-family: "sans";
    src: url(font/sans.ttf);
    }

    body {
    background-color: #19172e;
    font-family: "sans";
    index.html cody/swapnilsparsh/30DaysOfJavaScript/07 - Dynamic Form Field/index.html
    292 Views
    0 Comments
    <!DOCTYPE html>
    <html lang="en">
    <head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link rel="stylesheet" href="style.css">
    <link rel="shortcut icon" href="assets/form.png" type="image/x-icon">
    script.js cody/swapnilsparsh/30DaysOfJavaScript/07 - Dynamic Form Field/script.js
    160 Views
    0 Comments
    var survey_options = document.getElementById('survey_options');
    var add_more_fields = document.getElementById('add_fields');
    var remove_fields = document.getElementById('remove_fields');

    add_more_fields.onclick = function(){
    var newField = document.createElement('input');
    var input_tags = survey_options.getElementsByTagName('input');
    newField.setAttribute('type', 'text');